/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.cognition.util.marshal;

/**
 *
 * @author richard
 */
public class StringMarshaller {

    public static String unmarshal(byte[] b) throws IllegalArgumentException{

        return new String(b);
        
    }


    public static byte[] marshal(String s) throws IllegalArgumentException{

        if (s == null)
            throw new IllegalArgumentException("string must not be null.");

        return s.getBytes();


    }
}
